package com.ryskoo.customer.customerintegrallog.repository;

import com.ryskoo.catering.constant.HCLCacheConstant;
import com.ryskoo.customer.customerintegrallog.domain.CustomerIntegralLogPO;
import com.ryskoo.framework.core.repository.BasicRedisImpl;
import com.ryskoo.framework.core.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;

/**
 * @author BeHappy
 */
@Primary
@Repository
public class CustomerIntegralLogRedisImpl extends BasicRedisImpl<CustomerIntegralLogPO> implements ICustomerIntegralLogRepository {
    @Autowired
    private RedisUtil redisClient;
    @Autowired
    private ICustomerIntegralLogRepository customerIntegralRepository;

    @PostConstruct
    public void init() {
        this.setRedisClient(redisClient);
        this.setDao(customerIntegralRepository);
    }

    public CustomerIntegralLogRedisImpl() {
        super(HCLCacheConstant.HCL_INTEGRALLOG_KEY);
    }

}
